#!/usr/bin/expect                                                                                                                            

for {set j 0} {${j}<60} {incr j} {
    spawn ssh derek${j}@192.168.2.185
    expect {
        "yes/no" { send "yes\n"; exp_continue }
        "password:" { send "123456\n" }
    }
}